feat: implement bank account system with audit logging to BankATM#526
Closed
Dlafferty251 wants to merge 10 commits intocode-differently:mainfrom
Closed
feat: implement bank account system with audit logging to BankATM#526Dlafferty251 wants to merge 10 commits intocode-differently:mainfrom
Dlafferty251 wants to merge 10 commits intocode-differently:mainfrom
Conversation
anthonydmays
requested changes
Apr 14, 2025
Contributor
anthonydmays
left a comment
There was a problem hiding this comment.
I see this is WIP, so keep going.
|
|
||
| import java.util.ArrayList; | ||
|
|
||
| public class AuditLog { |
Contributor
There was a problem hiding this comment.
Not a bad implementation, good work. You might be interested in a library called Log4j that could be useful to you as well, but this is good enough for your homework.
Contributor
Author
There was a problem hiding this comment.
Refactored AuditLog class to Implement Log4j logic instead of custom implementation.
anthonydmays
requested changes
Apr 23, 2025
|
|
||
| private final Map<UUID, Customer> customerById = new HashMap<>(); | ||
| private final Map<String, CheckingAccount> accountByNumber = new HashMap<>(); | ||
| private final AuditLog auditLog = new AuditLog(); |
Contributor
There was a problem hiding this comment.
Violates the D in SOLID, no?
| * The {@code SavingsAccount} class represents a savings account in a banking system. It extends the | ||
| * {@code CheckingAccount} class and provides additional functionality specific to savings accounts. | ||
| */ | ||
| public class SavingsAccount extends CheckingAccount { |
Contributor
There was a problem hiding this comment.
A savings accounts is not a checking account.
| if (isClosed()) { | ||
| throw new IllegalStateException("Cannot withdraw from a closed account"); | ||
| } | ||
|
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
I have started the assignment, yet have not completed it. I have a savings account made that will override the withdraw method to not allow withdrawls if the user is on the savings account. I need to implement a feature that checks which account the user is on. I also have plans to add an Audit log feature because I think it will be a good way to teach me SOLID principles.